package com.example.culture.controller;

import com.example.culture.domain.User;
import com.example.culture.util.ResultBean;
import com.example.culture.util.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName LoginController
 * @Description TODO    用户登录注册找回密码操作
 * @Author lvyongwei
 * @Date 2020-06-12 9:26
 **/
@Controller
/**
 * 解决跨域
 */
@CrossOrigin
@RequestMapping("/user")
public class LoginController {


    @Autowired
    private RedisUtil redisUtil;


    /**
     * 用户注册
     * @param user   用户实体
     * @return
     */
    @PostMapping("/login2")
    @ResponseBody
    public ResultBean userLogin(@RequestBody User user){

        boolean flag=false;
        return ResultBean.toResult(flag,"登陆成功");
    }

}
